/**
 * 健康管理相关类型定义
 */

// 健康档案
export interface HealthArchive {
  fsid: string
  uid: string
  userName?: string
  userPhone?: string
  name: string
  birthday: string
  sex: string // 0-女, 1-男
  address: string
  medicalHistory: string
  seafoodAllergy: string
  takeHealthProducts: string
  exerciseFrequency: string
  dietaryStyle: string
  drinkingAlcohol: string
  jointPain: string
  healthGoal: string
  checkupDate: string
  status: number // 0-待审核, 1-已通过, 2-已拒绝
  auditReason?: string
  createTime: string
  updateTime: string
}

// 健康档案列表查询参数
export interface ArchiveListParams {
  page: number
  pageSize: number
  uid?: string
  phone?: string
  name?: string
  status?: number
  startTime?: string
  endTime?: string
}

// 新增/编辑健康档案参数
export interface SaveArchiveParams {
  uid: string
  name: string
  birthday: string
  sex: string // 0-女, 1-男
  address: string
  medicalHistory: string
  seafoodAllergy: string
  takeHealthProducts: string
  exerciseFrequency: string
  dietaryStyle: string
  drinkingAlcohol: string
  jointPain: string
  healthGoal: string
  checkupDate: string
}

// 审核健康档案参数
export interface AuditArchiveParams {
  id: string
  status: number // 1-通过, 2-拒绝
  auditReason?: string
}

// 批量审核参数
export interface BatchAuditParams {
  ids: string[]
  status: number
  auditReason?: string
}

// 体检报告
export interface HealthReport {
  fsid: string
  uid: string
  userName?: string
  userPhone?: string
  reportFile: string
  triglyceride: string // 甘油三酯
  HdlCholesterol: string // HDL胆固醇
  LdlCholesterol: string // LDL胆固醇
  bloodPressure: string // 血压
  hsCRP: string // 超敏C反应蛋白
  alanineAminotransferase: string // 肝功能(ALT)
  checkupDate: string
  createTime: string
  updateTime: string
}

// 体检报告列表查询参数
export interface ReportListParams {
  page: number
  pageSize: number
  uid?: string
  phone?: string
  checkupStartDate?: string
  checkupEndDate?: string
  startTime?: string
  endTime?: string
}

// 新增/编辑体检报告参数
export interface SaveReportParams {
  uid: string
  reportFile: string
  triglyceride: string
  HdlCholesterol: string
  LdlCholesterol: string
  bloodPressure: string
  hsCRP: string
  alanineAminotransferase: string
  checkupDate: string
}

// 健康指标查询参数
export interface IndicatorListParams {
  uid: string
  startDate?: string
  endDate?: string
}

// 健康指标趋势数据
export interface IndicatorTrend {
  dates: string[]
  triglyceride: number[]
  HdlCholesterol: number[]
  LdlCholesterol: number[]
  bloodPressure: string[]
  hsCRP: number[]
  alanineAminotransferase: number[]
}

// 健康指标响应数据
export interface IndicatorData {
  list: HealthReport[]
  trend: IndicatorTrend
}
